﻿<%@ Page Language="C#" MasterPageFile="~/HouseKeep/ManageMaster.master" AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="HouseKeep_Search" Title="辖区房管所管理页面" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  <script type="text/javascript" src="../src/jquery.js"></script>
<script type="text/javascript" src="../src/bgiframe.js"></script>
<script type="text/javascript" src="../src/weebox.js"></script>

<script language=javascript type="text/javascript">

$(document).ready(function(){


  $(".changeClass").click
  (
        function()
        {
               // alert($(this).attr("name"));
	      $.weeboxs.open('#boxcontent', {
	                      title:'选择调整年月：',
	                      onok:function()
	                            {
                                window.open("../StreetCenter/AddApply.aspx?applyid="+$(this).attr("name")+"&thetype=edit&effectDate="+$("#EffectDateMonth").attr("selectedValue"));
			                    //box.close();//增加事件方法后需手动关闭弹窗
	                        	}
	                      });
	
        }
  );




}); 



</script>
<div style="display:none" id="boxcontent">
    调整年月：&nbsp;<asp:DropDownList ID="EffectDateYear" runat="server">
    </asp:DropDownList>年
    <asp:DropDownList ID="EffectDateMonth" runat="server">
        <asp:ListItem>1</asp:ListItem>
        <asp:ListItem>2</asp:ListItem>
        <asp:ListItem>3</asp:ListItem>
        <asp:ListItem>4</asp:ListItem>
        <asp:ListItem>5</asp:ListItem>
        <asp:ListItem>6</asp:ListItem>
        <asp:ListItem>7</asp:ListItem>
        <asp:ListItem>8</asp:ListItem>
        <asp:ListItem>9</asp:ListItem>
        <asp:ListItem>10</asp:ListItem>
        <asp:ListItem>11</asp:ListItem>
        <asp:ListItem>12</asp:ListItem>
    </asp:DropDownList>月</div>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td height="65" bgcolor="#d5f3ff">
                <table width="60%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="32"><img src="../Images/Main_13.jpg" width="73" height="30"/></td>
                        <td>关键字：</td>
                        <td>
                            <asp:TextBox ID="txbcontent" runat="server"></asp:TextBox></td>
                        <td>搜索范围：</td>
                        <td style="width: 55px">
                            <asp:DropDownList ID="ddlsearch" runat="server">
                                <asp:ListItem>编号</asp:ListItem>
                                <asp:ListItem>姓名</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td><asp:Button ID="btnsearch" runat="server" Text="搜索" OnClick="btnsearch_Click" /></td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <br />
    <table width="100%" style="float:right;margin-right:100px; text-align:left">
        <tr>
            <td style="width:70%"></td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
    <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td style="height: 12px">
                <asp:GridView ID="gvshowbysearch" runat="server" AutoGenerateColumns="False" CssClass="GridViewStyle"
                    EmptyDataText="列表为空" Width="100%" OnRowDataBound="gvshowbysearch_RowDataBound" OnRowCommand="gvshowbysearch_RowCommand" AllowPaging="True" PageSize="15">
                    <Columns>
                        <asp:TemplateField HeaderText="编号">
                            <ItemTemplate>
                                <%#string.IsNullOrEmpty(Eval("apply_longid").ToString())?Eval("apply_noid"):Eval("apply_longid")%>
                            </ItemTemplate>
                            <ItemStyle Width="20%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="详情">
                            <ItemTemplate>
                                申请人：<%#(Eval("apply_name"))%>
                                &nbsp; &nbsp; 申请时间：<%#Convert.ToDateTime(Eval("apply_time")).ToString("yyyy年MM月dd日")%>
                                <br />
                                地址:<%#Eval("apply_address") %>
                            </ItemTemplate>
                            <ItemStyle Width="40%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="状态">
                            <ItemTemplate>
                                <%#GetSituation(Eval("apply_checkstate").ToString(), Eval("apply_passed").ToString())%>
                            </ItemTemplate>
                            <ItemStyle Width="15%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                            <asp:HyperLink ID="hlkview" Target="_blank" NavigateUrl='<%# "../PublicContent/ViewApply.aspx?applyid="+Eval("apply_id")+"&id="+Eval("apply_noid") %>' runat="server">查看</asp:HyperLink>
                        
                                <a href='<%# "../StreetCenter/AddApply.aspx?applyid="+Eval("apply_id") %>&thetype=edit' target="_blank"  Font-Size="14px">校对</a>
                                <a   class='changeClass' name="<%#Eval("apply_id") %>"  Font-Size="14px">调整</a>
                            </ItemTemplate>
                            <ItemStyle Width="25%" />
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle CssClass="FooterStyle" />
                    <RowStyle CssClass="RowStyle" />
                    <EmptyDataRowStyle CssClass="EmptyRowStyle" />
                    <PagerStyle CssClass="PagerStyle" />
                    <SelectedRowStyle CssClass="SelectedRowStyle" />
                    <HeaderStyle CssClass="HeaderStyle" />
                    <EditRowStyle CssClass="EditRowStyle" />
                    <AlternatingRowStyle CssClass="AltRowStyle" />
                    <PagerSettings Visible="False" />
                </asp:GridView>
                <div style="text-align:center; font-size:15px">
                    <br />
                    <asp:Button ID="btnfirstpage" runat="server" Text="首页" OnClick="btnfirstpage_Click" />
                    <asp:Button ID="btnprepage" runat="server" OnClick="btnprepage_Click" Text="上一页" />
                    <asp:Button ID="btnnextpage" runat="server" OnClick="btnnextpage_Click" Text="下一页" />
                    <asp:Button ID="btnlastpage" runat="server" Text="尾页" OnClick="btnlastpage_Click" />&nbsp;
                    转跳到：<asp:DropDownList ID="ddlpages" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlpages_SelectedIndexChanged">
                    </asp:DropDownList>
                    <br />
                    <br />
                </div>
            </td>
        </tr>
    </table>
</asp:Content>

